home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
026-050
/
049
/
plot
/
mouse.c
< prev
next >
Wrap
Text File
|
1995-03-13
|
615b
|
33 lines
#define MAXX 319
#define MINX 0
#define MAXY 199
#define MINY 0
SHORT mx,my;
mouse()
{
char button;
struct IntuiMessage *BdMsg;
APTR Maddress;
button=1;
while(button){
while (BdMsg = (struct IntuiMessage *)GetMsg(w->UserPort)){
Maddress = BdMsg->IAddress;
mx = BdMsg->MouseX;
my = BdMsg->MouseY;
if (mx>MAXX)
mx=MAXX;
if (mx<MINX)
mx=MINX;
if (my>MAXY)
my=MAXY;
if (my<MINY)
my=MINY;
button=(*((unsigned char *)0xbfe001)) & 0x40;
ReplyMsg(BdMsg);
}
}
}